<%--
  Created by IntelliJ IDEA.
  User: 17126
  Date: 2022/3/24
  Time: 16:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>信息显示</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    out.print("姓名：" + request.getParameter("user") + "<br>");
    int age = 2022 - Integer.parseInt(request.getParameter("year"));
    out.print("年龄：" + age + "<br>");
    out.print("性别：" + request.getParameter("sex") + "<br>");
    String[] hobbies = request.getParameterValues("hobby");
    out.print("爱好：");
    for (String i : hobbies) {
        out.print(i + " ");
    }
%>
</body>
</html>
